// 志愿者端接口
import {$http} from "@/utils/request/requestConfig.js"

const api = {
	"start":"api/travel/volunteer/start",
	"stop":"api/travel/volunteer/stop",
	"list":"api/travel/volunteer/apply/list",
	"count":"api/travel/volunteer/apply/count",
	"info":"api/travel/volunteer/apply/info",
	"apply":"api/travel/volunteer/apply",
	"delete":"api/travel/volunteer/apply/{travelApplyId}"
	
}

export const startService = (data) => {
	return $http.post(api.start,data)
}

export const stopService = (data) => {
	return $http.post(api.stop,data)
}

export const serviceList = () => {
	return $http.get(api.list)
} 

export const serviceCount = () => {
	return $http.get(api.count)
}

export const requestInfo = (data) => {
	return $http.get(api.info,data)
}

export const applyRequest = (data) => {
	return $http.post(api.apply,data)
}

export const deleteRequest = (data) => {
	const deleteReq = api.delete.replace(/{travelApplyId}/,data)
	return $http.delete(deleteReq,data)
}